Optimal. Leaf size=162 \[ \frac {(b c+a d) x}{2 b (b c-a d)^2 \left (c+d x^2\right )}+\frac {a x}{2 b (b c-a d) \left (a+b x^2\right ) \left (c+d x^2\right )}-\frac {\sqrt {a} (3 b c+a d) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 \sqrt {b} (b c-a d)^3}+\frac {\sqrt {c} (b c+3 a d) \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{2 \sqrt {d} (b c-a d)^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 162, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {481, 541, 536,
211} \begin {gather*} -\frac {\sqrt {a} \text {ArcTan}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) (a d+3 b c)}{2 \sqrt {b} (b c-a d)^3}+\frac {\sqrt {c} (3 a d+b c) \text {ArcTan}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{2 \sqrt {d} (b c-a d)^3}+\frac {x (a d+b c)}{2 b \left (c+d x^2\right ) (b c-a d)^2}+\frac {a x}{2 b \left (a+b x^2\right ) \left (c+d x^2\right ) (b c-a d)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 481
Rule 536
Rule 541
Rubi steps
\begin {align*} \int \frac {x^4}{\left (a+b x^2\right )^2 \left (c+d x^2\right )^2} \, dx &=\frac {a x}{2 b (b c-a d) \left (a+b x^2\right ) \left (c+d x^2\right )}-\frac {\int \frac {a c+(-2 b c-a d) x^2}{\left (a+b x^2\right ) \left (c+d x^2\right )^2} \, dx}{2 b (b c-a d)}\\ &=\frac {(b c+a d) x}{2 b (b c-a d)^2 \left (c+d x^2\right )}+\frac {a x}{2 b (b c-a d) \left (a+b x^2\right ) \left (c+d x^2\right )}-\frac {\int \frac {4 a b c^2-2 b c (b c+a d) x^2}{\left (a+b x^2\right ) \left (c+d x^2\right )} \, dx}{4 b c (b c-a d)^2}\\ &=\frac {(b c+a d) x}{2 b (b c-a d)^2 \left (c+d x^2\right )}+\frac {a x}{2 b (b c-a d) \left (a+b x^2\right ) \left (c+d x^2\right )}-\frac {(a (3 b c+a d)) \int \frac {1}{a+b x^2} \, dx}{2 (b c-a d)^3}+\frac {(c (b c+3 a d)) \int \frac {1}{c+d x^2} \, dx}{2 (b c-a d)^3}\\ &=\frac {(b c+a d) x}{2 b (b c-a d)^2 \left (c+d x^2\right )}+\frac {a x}{2 b (b c-a d) \left (a+b x^2\right ) \left (c+d x^2\right )}-\frac {\sqrt {a} (3 b c+a d) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 \sqrt {b} (b c-a d)^3}+\frac {\sqrt {c} (b c+3 a d) \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{2 \sqrt {d} (b c-a d)^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.14, size = 133, normalized size = 0.82 \begin {gather*} \frac {1}{2} \left (\frac {a x}{(b c-a d)^2 \left (a+b x^2\right )}+\frac {c x}{(b c-a d)^2 \left (c+d x^2\right )}+\frac {\sqrt {a} (3 b c+a d) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {b} (-b c+a d)^3}+\frac {\sqrt {c} (b c+3 a d) \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{\sqrt {d} (b c-a d)^3}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.22, size = 117, normalized size = 0.72
method | result | size |
default | \(\frac {a \left (\frac {\left (\frac {a d}{2}-\frac {b c}{2}\right ) x}{b \,x^{2}+a}+\frac {\left (a d +3 b c \right ) \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}}\right )}{\left (a d -b c \right )^{3}}-\frac {c \left (\frac {\left (-\frac {a d}{2}+\frac {b c}{2}\right ) x}{d \,x^{2}+c}+\frac {\left (3 a d +b c \right ) \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{2 \sqrt {c d}}\right )}{\left (a d -b c \right )^{3}}\) | \(117\) |
risch | \(\text {Expression too large to display}\) | \(1816\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.53, size = 249, normalized size = 1.54 \begin {gather*} -\frac {{\left (3 \, a b c + a^{2} d\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, {\left (b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} \sqrt {a b}} + \frac {{\left (b c^{2} + 3 \, a c d\right )} \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{2 \, {\left (b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} \sqrt {c d}} + \frac {{\left (b c + a d\right )} x^{3} + 2 \, a c x}{2 \, {\left (a b^{2} c^{3} - 2 \, a^{2} b c^{2} d + a^{3} c d^{2} + {\left (b^{3} c^{2} d - 2 \, a b^{2} c d^{2} + a^{2} b d^{3}\right )} x^{4} + {\left (b^{3} c^{3} - a b^{2} c^{2} d - a^{2} b c d^{2} + a^{3} d^{3}\right )} x^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 331 vs.
\(2 (138) = 276\).
time = 1.40, size = 1407, normalized size = 8.69 \begin {gather*} \left [\frac {2 \, {\left (b^{2} c^{2} - a^{2} d^{2}\right )} x^{3} - {\left ({\left (3 \, b^{2} c d + a b d^{2}\right )} x^{4} + 3 \, a b c^{2} + a^{2} c d + {\left (3 \, b^{2} c^{2} + 4 \, a b c d + a^{2} d^{2}\right )} x^{2}\right )} \sqrt {-\frac {a}{b}} \log \left (\frac {b x^{2} + 2 \, b x \sqrt {-\frac {a}{b}} - a}{b x^{2} + a}\right ) - {\left ({\left (b^{2} c d + 3 \, a b d^{2}\right )} x^{4} + a b c^{2} + 3 \, a^{2} c d + {\left (b^{2} c^{2} + 4 \, a b c d + 3 \, a^{2} d^{2}\right )} x^{2}\right )} \sqrt {-\frac {c}{d}} \log \left (\frac {d x^{2} - 2 \, d x \sqrt {-\frac {c}{d}} - c}{d x^{2} + c}\right ) + 4 \, {\left (a b c^{2} - a^{2} c d\right )} x}{4 \, {\left (a b^{3} c^{4} - 3 \, a^{2} b^{2} c^{3} d + 3 \, a^{3} b c^{2} d^{2} - a^{4} c d^{3} + {\left (b^{4} c^{3} d - 3 \, a b^{3} c^{2} d^{2} + 3 \, a^{2} b^{2} c d^{3} - a^{3} b d^{4}\right )} x^{4} + {\left (b^{4} c^{4} - 2 \, a b^{3} c^{3} d + 2 \, a^{3} b c d^{3} - a^{4} d^{4}\right )} x^{2}\right )}}, \frac {2 \, {\left (b^{2} c^{2} - a^{2} d^{2}\right )} x^{3} - 2 \, {\left ({\left (3 \, b^{2} c d + a b d^{2}\right )} x^{4} + 3 \, a b c^{2} + a^{2} c d + {\left (3 \, b^{2} c^{2} + 4 \, a b c d + a^{2} d^{2}\right )} x^{2}\right )} \sqrt {\frac {a}{b}} \arctan \left (\frac {b x \sqrt {\frac {a}{b}}}{a}\right ) - {\left ({\left (b^{2} c d + 3 \, a b d^{2}\right )} x^{4} + a b c^{2} + 3 \, a^{2} c d + {\left (b^{2} c^{2} + 4 \, a b c d + 3 \, a^{2} d^{2}\right )} x^{2}\right )} \sqrt {-\frac {c}{d}} \log \left (\frac {d x^{2} - 2 \, d x \sqrt {-\frac {c}{d}} - c}{d x^{2} + c}\right ) + 4 \, {\left (a b c^{2} - a^{2} c d\right )} x}{4 \, {\left (a b^{3} c^{4} - 3 \, a^{2} b^{2} c^{3} d + 3 \, a^{3} b c^{2} d^{2} - a^{4} c d^{3} + {\left (b^{4} c^{3} d - 3 \, a b^{3} c^{2} d^{2} + 3 \, a^{2} b^{2} c d^{3} - a^{3} b d^{4}\right )} x^{4} + {\left (b^{4} c^{4} - 2 \, a b^{3} c^{3} d + 2 \, a^{3} b c d^{3} - a^{4} d^{4}\right )} x^{2}\right )}}, \frac {2 \, {\left (b^{2} c^{2} - a^{2} d^{2}\right )} x^{3} + 2 \, {\left ({\left (b^{2} c d + 3 \, a b d^{2}\right )} x^{4} + a b c^{2} + 3 \, a^{2} c d + {\left (b^{2} c^{2} + 4 \, a b c d + 3 \, a^{2} d^{2}\right )} x^{2}\right )} \sqrt {\frac {c}{d}} \arctan \left (\frac {d x \sqrt {\frac {c}{d}}}{c}\right ) - {\left ({\left (3 \, b^{2} c d + a b d^{2}\right )} x^{4} + 3 \, a b c^{2} + a^{2} c d + {\left (3 \, b^{2} c^{2} + 4 \, a b c d + a^{2} d^{2}\right )} x^{2}\right )} \sqrt {-\frac {a}{b}} \log \left (\frac {b x^{2} + 2 \, b x \sqrt {-\frac {a}{b}} - a}{b x^{2} + a}\right ) + 4 \, {\left (a b c^{2} - a^{2} c d\right )} x}{4 \, {\left (a b^{3} c^{4} - 3 \, a^{2} b^{2} c^{3} d + 3 \, a^{3} b c^{2} d^{2} - a^{4} c d^{3} + {\left (b^{4} c^{3} d - 3 \, a b^{3} c^{2} d^{2} + 3 \, a^{2} b^{2} c d^{3} - a^{3} b d^{4}\right )} x^{4} + {\left (b^{4} c^{4} - 2 \, a b^{3} c^{3} d + 2 \, a^{3} b c d^{3} - a^{4} d^{4}\right )} x^{2}\right )}}, \frac {{\left (b^{2} c^{2} - a^{2} d^{2}\right )} x^{3} - {\left ({\left (3 \, b^{2} c d + a b d^{2}\right )} x^{4} + 3 \, a b c^{2} + a^{2} c d + {\left (3 \, b^{2} c^{2} + 4 \, a b c d + a^{2} d^{2}\right )} x^{2}\right )} \sqrt {\frac {a}{b}} \arctan \left (\frac {b x \sqrt {\frac {a}{b}}}{a}\right ) + {\left ({\left (b^{2} c d + 3 \, a b d^{2}\right )} x^{4} + a b c^{2} + 3 \, a^{2} c d + {\left (b^{2} c^{2} + 4 \, a b c d + 3 \, a^{2} d^{2}\right )} x^{2}\right )} \sqrt {\frac {c}{d}} \arctan \left (\frac {d x \sqrt {\frac {c}{d}}}{c}\right ) + 2 \, {\left (a b c^{2} - a^{2} c d\right )} x}{2 \, {\left (a b^{3} c^{4} - 3 \, a^{2} b^{2} c^{3} d + 3 \, a^{3} b c^{2} d^{2} - a^{4} c d^{3} + {\left (b^{4} c^{3} d - 3 \, a b^{3} c^{2} d^{2} + 3 \, a^{2} b^{2} c d^{3} - a^{3} b d^{4}\right )} x^{4} + {\left (b^{4} c^{4} - 2 \, a b^{3} c^{3} d + 2 \, a^{3} b c d^{3} - a^{4} d^{4}\right )} x^{2}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.63, size = 198, normalized size = 1.22 \begin {gather*} -\frac {{\left (3 \, a b c + a^{2} d\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, {\left (b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} \sqrt {a b}} + \frac {{\left (b c^{2} + 3 \, a c d\right )} \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{2 \, {\left (b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} \sqrt {c d}} + \frac {b c x^{3} + a d x^{3} + 2 \, a c x}{2 \, {\left (b d x^{4} + b c x^{2} + a d x^{2} + a c\right )} {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.03, size = 2500, normalized size = 15.43 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________